<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="../taglib_includes.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
</head>
<body>
<h2>Tenant Configration</h2>
<form:form action="processTenantProvision.htm" name="processTenantProvision" method="POST">
<label>Tenants Id</label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="text" name="tenantId" value="${tenant.tenantId}" />
<br />

<label>Tenants Name</label>
&nbsp;
<input type="text" name="tName" value="${tenant.name}" />
<br /><br />

<c:forEach var="mData" items="${metaDataDTOs}">
 <span>${mData.metaData}</span> 
  <c:choose>
  <c:when test="${mData.type == 1}">
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	 <span>
	 <img src="http://localhost:8080/epms/${mData.data}" alt="${mData.metaData}" height="30" width="30">
	 <br />
	 <label>Change ${mData.metaData}</label> <input type="file" size="10" name="fname_${mData.metaData}"/>	
	 <input name="${mData.metaData}" value="http://localhost:8080/epms/${mData.data}" type="hidden"/> 
	 </span>
  </c:when>
 <c:when test="${mData.type == 3}">
	 &nbsp;&nbsp;&nbsp;
	 <span>
	 <img src="http://localhost:8080/epms/file.jpg" alt="${mData.metaData}" height="40" width="40">	 
 	 <br />
	 <label>Change ${mData.metaData}</label> <input type="file" size="10" name="fname_${mData.metaData}" />
	 <input name="${mData.metaData}" value="http://localhost:8080/epms/file.jpg" type="hidden"/>
	 </span>
 </c:when>
 </c:choose>
  <br /><br />
 


<%--  <c:if test="${mData.type == 3}">
 <span>
 <img src="http://localhost:8080/epms/file.jpeg" alt="${mData.metaData}" height="30" width="30">
 &nbsp;
 <a href="#">Change ${mData.metaData}</a>
 </span>
 </c:if> --%>
 
 
 </c:forEach>
<br />
<br />
<input type="submit" value="Provision Tenant" />
</form:form>

<br />
<br />

<a href='j_spring_security_logout'> Logout</a>&nbsp;&nbsp;&nbsp;  <a href="authenticateSuccess.htm"> Back</a>
  
<c:if test="${not empty param.res && param.res == 0}">
 <script type="text/javascript">
  alert("Please add again !!");
 </script>
</c:if>
</body>
</html>